home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #1 / Ham Radio 2000.iso / ham2000 / hf / dsp / dsp4src / nochange.asm < prev    next >
Encoding:
Assembly Source File  |  1993-04-24  |  1.3 KB  |  72 lines

  1. ;***************************************************************
  2. ;* NOCHANGE.ASM -- Pass input to output without change           *
  3. ;*                                   *
  4. ;* Provides extremely narrow FIR bandpass filter.           *
  5. ;*                                   *
  6. ;* Copyright (C) 1993 by Alef Null. All rights reserved.       *
  7. ;* Author(s): Jarkko Vuori, OH2LNS                   *
  8. ;* Modification(s):                           *
  9. ;***************************************************************
  10.  
  11.  
  12.     nolist
  13.     include 'leonid'
  14.     list
  15.  
  16.  
  17. buflen    equ    16                    ; lenght of sample buffer
  18. stereo    equ    0                    ; mono/stereo selector
  19.  
  20.  
  21.     org    p:user_code
  22.  
  23.     move            #buffer+2,r7
  24.     move            #buflen*4-1,m7
  25.  
  26.     move            #buffer,r2
  27.     move            #4-1,n2
  28.     move            #buflen*4-1,m2
  29.  
  30.     ctrlcd    1,r2,buflen,LINEI,0.0,0.0,LINEO|HEADP,0.0,0.0
  31.     opencd    16
  32.  
  33. ; wait for one complete block
  34. loop    waitblk r2,buflen,1
  35.  
  36. ; *** stereo mode
  37.     if stereo
  38. ; transfer left channel input to the output
  39.     move            x:(r2)+,a
  40.     move            a,y:(r2)
  41.  
  42. ; transfer right channel input to the output
  43.     move            x:(r2)+,a
  44.     move            a,y:(r2)
  45.  
  46.     move            (r2)+
  47.     move            (r2)+
  48.  
  49. ; *** mono mode
  50.     else
  51.     move            x:(r2)+,a
  52.     move            a,y:(r2)+
  53.     move            a,y:(r2)+
  54.     move            (r2)+
  55.  
  56.     endif
  57.  
  58.     jmp    <loop
  59.  
  60.  
  61.     org    x:user_data
  62.  
  63. buffer    dsm    buflen*4
  64.  
  65.  
  66.     org    y:user_data
  67.  
  68.     dsm    buflen*4
  69.  
  70.  
  71.     end
  72.